#include "substitute.h"
#include "types.h"
#include "sbox.h"

void substitute(byte* state)
{
	int row, col;
	for(row = 0; row < 4; ++row)
	{
		for(col = 0; col < 4; ++col)
		{
			state[row* 4 + col] = sbox[ state[row * 4 + col] ];
		}
	}
}
